extends AttributeReaction



@onready var _damage_sender: DamageSender = $"DamageSender"
@onready var _amt_player: AnimationPlayer = $"AnimationPlayer"
@onready var _vfx: Sprite2D = $"VFX"

@export var _magnification: float = 2.75



func _ready() -> void:
    _damage_sender.disabled = true
    _vfx.global_position = get_parent().get_parent().center_position()
    # _vfx.hide()


## 实现效果
func effect(info: DamageInfo) -> void:
    _damage_sender.damage_info.damage = info.damage * 0.75
    _damage_sender.damage_info.source = info.source
    _damage_sender.damage_info.attribute = info.attribute
    _damage_sender.disabled = false
    info.damage *= _magnification
    # _vfx.show()
    # _vfx.play("default")
    _amt_player.play("explosion")
    # await get_tree().create_timer(0.1).timeout
    # await _vfx.animation_finished
    # _vfx.hide()
    # _damage_sender.disabled = true
    pass